const path = require('path')
const resolve = dir => {
  return path.join(__dirname, dir)
}
module.exports = {
  outputDir: '../ipackage-be/public',
  publicPath:  '/ipackage/',
  productionSourceMap: false,
  configureWebpack: {
    resolve: {
      alias: {
        'src': resolve('src'),
        'common': resolve('src/common'),
        'classes': resolve('src/common/classes'),
        'stylus': resolve('src/common/stylus'),
        'components': resolve('src/components'),
        'api' : resolve('src/api'),
        'service' : resolve('src/service')
      }
    },
    devServer: {
      port: 7001,
      host: '0.0.0.0',
      proxy: {
        '/api':  {
          target: 'http://localhost:7000',
          ws: true,
          changeOrigin: true
        }
      }
    }
  }
}
